import request from '@/router/axios'

export const getBankList = (params) => {
  return request({
    url: '/biz-api/pv-supplier/supplierbank/list',
    method: 'get',
    params
  })
}

export const getBankDetail = id => {
  return request({
    url: '/biz-api/pv-supplier/supplierbank/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeBank = ids => {
  return request({
    url: '/biz-api/pv-supplier/supplierbank/remove',
    method: 'post',
    params: {
      ids
    }
  })
}

export const addBank = row => {
  return request({
    url: '/biz-api/pv-supplier/supplierbank/submit',
    method: 'post',
    data: row
  })
}

export const updateBank = row => {
  return request({
    url: '/biz-api/pv-supplier/supplierbank/submit',
    method: 'post',
    data: row
  })
}
// 开户行名称搜索
export const getBankInfo = params => {
  return request({
    url: '/biz-api/pv-supplier/bank/getBankInfo    ',
    method: 'get',
    params
  })
}
